import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * 
 */

/**
 * @author svene_000
 *
 */
public class CustomerTest {

	Customer testCustomer;
	
	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		testCustomer = new Customer("test first name", "test last name", "test street", "test zip", "test town", "test country");
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
		testCustomer = null;
	}

	/**
	 * Test method for {@link Customer#getName()}.
	 */
	@Test
	public void testGetName() {
		assertEquals("test last name, test first name", testCustomer.getName());
	}

	/**
	 * Test method for {@link Customer#getStreetAddress()}.
	 */
	@Test
	public void testGetStreetAddress() {
		assertEquals("test street", testCustomer.getStreetAddress());
	}

	/**
	 * Test method for {@link Customer#getZipcode()}.
	 */
	@Test
	public void testGetZipcode() {
		assertEquals("test zip", testCustomer.getZipcode());
	}

	/**
	 * Test method for {@link Customer#getTown()}.
	 */
	@Test
	public void testGetTown() {
		assertEquals("test town", testCustomer.getTown());
	}

	/**
	 * Test method for {@link Customer#getCountry()}.
	 */
	@Test
	public void testGetCountry() {
		assertEquals("test country", testCustomer.getCountry());
	}

	/**
	 * Test method for {@link Customer#setFirstName(java.lang.String)}.
	 */
	@Test
	public void testSetFirstName() {
		testCustomer.setFirstName("First");
		testCustomer.setLastName("Last");
		assertEquals("Last, First", testCustomer.getName());
	}

	/**
	 * Test method for {@link Customer#setLastName(java.lang.String)}.
	 */
	@Test
	public void testSetLastName() {
		testCustomer.setFirstName("First");
		testCustomer.setLastName("Last");
		assertEquals("Last, First", testCustomer.getName());
	}

	/**
	 * Test method for {@link Customer#setStreetAddress(java.lang.String)}.
	 */
	@Test
	public void testSetStreetAddress() {
		testCustomer.setStreetAddress("new street");
		assertEquals("new street", testCustomer.getStreetAddress());
	}

	/**
	 * Test method for {@link Customer#setZipcode(java.lang.String)}.
	 */
	@Test
	public void testSetZipcode() {
		testCustomer.setZipcode("new zip");
		assertEquals("new zip", testCustomer.getZipcode());
	}

	/**
	 * Test method for {@link Customer#setTown(java.lang.String)}.
	 */
	@Test
	public void testSetTown() {
		testCustomer.setTown("new town");
		assertEquals("new town", testCustomer.getTown());
	}

	/**
	 * Test method for {@link Customer#setCountry(java.lang.String)}.
	 */
	@Test
	public void testSetCountry() {
		testCustomer.setCountry("new country");
		assertEquals("new country", testCustomer.getCountry());
	}

}
